<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>支付方式查看</title>
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
<script language="javascript">
	 $().ready(function(){
		 <c:forEach items="${paymentMethod.shippingMethods }" var="pshippingMethod">
		 	var psmId = ${pshippingMethod.id};
		 	$("input[name='shippingMethodId']").each(function(){
		 		var $this = $(this);
		 		if($this.val() == psmId) {
		 			$this.attr("checked",true);
		 		}
		 	});
		 </c:forEach>
	 });
</script>
</head>

<body>
	<table width="98%" class="input tabContent">
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">名称：</td>
			<td class="tdLeft">${paymentMethod.name }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">方式：</td>
			<td class="tdLeft">
				<c:choose>
					<c:when test="${not empty paymentMethod.method && paymentMethod.method == 0 }">网上支付</c:when>
					<c:otherwise>线下支付</c:otherwise>
				</c:choose>
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">超时时间：</td>
			<td class="tdLeft">${paymentMethod.timeout }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">支持配送方式：</td>
			<td class="tdLeft">
				<c:forEach items="${shippingMethods }" var="shippingMethod">
					<input type="checkbox" name="shippingMethodId" value="${shippingMethod.id }" disabled/>${shippingMethod.name }
				</c:forEach>
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">介绍：</td>
			<td class="tdLeft">${paymentMethod.description }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">排序：</td>
			<td class="tdLeft">${paymentMethod.orders }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">内容：</td>
			<td class="tdLeft">
				${paymentMethod.content }
			</td>
		</tr>
	</table>
	<table width="98%">
		<tr bgcolor="#EEF4EA">
			<td height="36" colspan="10">
				<input type="button" value="返回" class="button" onclick="location.href='<%=basePath%>admin/paymentMethod/list.shtml'" >
			</td>
		</tr>
	</table>
</body>
</html>
